package com.ytjj.quartz.dao;

import com.ytjj.qmyx.mall.model.PlatformStatistics;
import com.ytjj.quartz.model.DataStatisticsRequest;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 
 * 
 * @Version 1.0
 **/
public interface PlatformStatisticsDao {

    Integer getChannelOrderData(@Param("startTime") LocalDateTime startTime,
                                @Param("endTime") LocalDateTime endTime,
                                @Param("platform") String platform,
                                @Param("channel") String channel,
                                @Param("userAddress") String userAddress,
                                @Param("isPay") Integer isPay,
                                @Param("isFirstBuy") Integer isFirstBuy);

    Integer insertPlatform(PlatformStatistics platformStatistics);

    Integer updatePlatform(PlatformStatistics platformStatistics);

    PlatformStatistics getStatistics(@Param("source") String source);

    Integer flushPlatform(PlatformStatistics platformStatistics);

    BigDecimal getPayMoney(DataStatisticsRequest dataStatisticsRequest);

    BigDecimal getCostMoney(DataStatisticsRequest dataStatisticsRequest);

    Integer getActiveUser(DataStatisticsRequest dataStatisticsRequest);

    Integer getNewAddUser(DataStatisticsRequest dataStatisticsRequest);

    Integer getClickAddress(DataStatisticsRequest dataStatisticsRequest);

}
